const { Transform } = require('stream')

class MyTransform extends Transform{
  constructor(){
    super()
  }
  _transform(chunk,en,cb){
    this.push(chunk.toString().toUpperCase())
    cb(null)
  }
}

let myTs = new MyTransform()

myTs.write('a')

myTs.on('data',(chunk)=>{
  console.log(chunk.toString())
})
// A
